<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <base href="<%=basePath%>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>北大青鸟办公自动化管理系统</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
  
  <body>
  <iframe src="head.jsp" width="100%" scrolling="no" frameborder="0" ></iframe>

  <div class="main"><div class="global-width">	
	  <iframe src="nav.jsp" scrolling="no" align="left" width="191px" height="400px"></iframe>
    <div class="action">
    	<div class="t">修改用户角色</div>
   		<div class="pages">
   		<form action="changeUR.action" method="post">
        	  <table width="70%" border="0" cellspacing="0" cellpadding="0" class="list">
                  <tr>
                    <td>用户名</td>
                    <td><s:textfield name="user.id" value="%{#session.user.id}" theme="simple" readonly="true"/></td>
                  </tr>                 
                    <tr>
                    <td>用户角色</td>                   
                  </tr>  
                  <s:iterator value="roleList">
                  		<tr>
                  			<td>&nbsp;</td>
                  			<td align="right">
                  				<s:if test="id in #request.had">
                  					<s:property value="rolename"/><s:checkbox value="true" name="rids" fieldValue="%{id}" theme="simple"></s:checkbox> 
                  				</s:if>
                  				<s:else>
                  					<s:property value="rolename"/><s:checkbox value="false" name="rids" fieldValue="%{id}"  theme="simple"></s:checkbox> 
                  				</s:else>
                  			</td>
                  		</tr>
                  </s:iterator>                 
                  <tr>
                  	<td colspan="2" align="right">
                  		<s:actionerror/>
                  		<s:submit value="修改角色" theme="simple" />
						<s:reset value="重置" theme="simple" />					
                  	</td>
                  </tr>
                </table>        
       </form>
        </div>
    </div>
</div></div>
 <iframe src="footer.jsp" width="100%" scrolling="no" frameborder="0" ></iframe>
 <s:debug></s:debug>
 <s:property value="mlist.size"/>
  </body>
</html>
